package com.ruoyi.common.exception;

import java.util.List;

/**
 * GlobalErrorLostException
 *  处理错误信息列表
 * @author HHKJ-SERVER-ZJ
 * @since 2023/5/22 17:08
 */
public class GlobalErrorListException extends RuntimeException
{
    private int code = 600;

    private String message;

    private List<?> errorList;

    public GlobalErrorListException(List<?> errorList)
    {
        this.errorList = errorList;
        this.message = "操作失败";
    }

    public GlobalErrorListException(List<?> errorList, String message)
    {
        this.errorList = errorList;
        this.setMessage(message);
    }

    public GlobalErrorListException()
    {
    }

    public List<?> getErrorList()
    {
        return errorList;
    }

    public void setErrorList(List<?> errorList)
    {
        this.errorList = errorList;
    }

    @Override
    public String getMessage()
    {
        return message;
    }

    public void setMessage(String message)
    {
        this.message = message;
    }

    public int getCode()
    {
        return code;
    }

    public void setCode(int code)
    {
        this.code = code;
    }
}
